package com.eaoa.uc.address.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.eaoa.base.EABaseAction;
import com.eaoa.query.pub.PubAddressQuery;

public class HRAddressSearchExpandAction extends EABaseAction {

	protected ActionForward doWork(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {

		String addressno = request.getParameter("addressno");
		Long longaddressno = Long.valueOf(addressno);
		request.setAttribute("addressno", addressno);
		PubAddressQuery query = new PubAddressQuery();
		query.setAddressno(longaddressno);
		query.execute();

		request.setAttribute("results", query.getResults());
		return mapping.findForward("success");
	}
}